Video or other media signals, may be used by a variety of devices, including televisions, broadcast systems, mobile devices, and both laptop and desktop computers. Typically, devices may display video in response to receipt of video or other media signals, often after decoding the signal from an encoded form. Video signals provided between devices are often encoded using one or more of a variety of encoding and/or compression techniques, and video signals are typically encoded in a manner to be decoded in accordance with a particular standard, such as MPEG-2, MPEG-4, and H.264/MPEG-4 Part 10. By encoding video or other media signals, then decoding the received signals, the amount of data needed to transmit video between devices may be significantly reduced.
Video encoding typically proceeds by encoding macroblocks, or other units, of video data. Prediction coding may be used to generate predictive blocks and residual blocks, where the residual blocks represent a difference between a predictive block and the block being coded. Prediction coding may include spatial and/or temporal predictions to remove redundant data in video signals, thereby further increasing the reduction of data. Intracoding for example, is directed to spatial prediction and reducing the amount of spatial redundancy between blocks in a frame or slice. Intercoding, on the other hand, is directed toward temporal prediction and reducing the amount of temporal redundancy between blocks in successive frames or slices. Intercoding may make use of motion prediction to track movement between corresponding blocks of successive frames or slices.
Typically, in encoder implementations, including intracoding and intercoding based implementations, residual blocks (e.g., difference between actual and predicted blocks) may be transformed, quantized, and encoded using one of a variety of encoding techniques (e.g., entropy encoding) to generate a set of coefficients. It is these coefficients that may be transmitted between the encoding device and the decoding device. Quantization may be determinative of the amount of loss that may occur during the encoding of a video stream. That is, the amount of data that is removed from a bitstream may be dependent on a quantization parameter generated by and/or provided to an encoder.
Video encoding techniques typically perform some amount of rate-distortion optimization. That is, there is generally a trade-off between an achievable data rate and the amount of distortion present in a decoded signal. Many encoders utilize quantization for rate-distortion optimization of a video signal in accordance with one or more coding standards. In doing so, however, costs, including rate costs and distortion costs, must be calculated so that coefficients of each residual block may be optimized for the selected coding standard. This cost measurement requires not only transformation and quantization of coefficients, but encoding of the coefficients as well. As a result, and in particular for more complex encoding algorithms, optimizing coefficients in real-time has presented challenges. Because many coding standards require highly complex and demanding computations for encoding, rate calculation, and therefore, rate-distortion optimization, for many current coding standards, is simply too demanding for completion in real-time.